<?php
include_once $_SERVER['DOCUMENT_ROOT'].'/lib/jApi.php';
$API=jApi::inst( $_SERVER['DOCUMENT_ROOT'].'/z_tmp/rewrite/cnfig.php' );
if($API->hasErrors()){
	echo '<pre class="debug">'.print_r ( $API->getErrors() ,true).'</pre>'; exit();
}
$API->setPath( $_SERVER['DOCUMENT_ROOT'].'/lib/' );

if(!$rs=$API->run())
	echo '<pre class="debug">'.print_r ( $API->getErrors() ,true).'</pre>';

//$API->get('/cities/UA/?page=all');

/*
include_once $_SERVER['DOCUMENT_ROOT'].'/lib/jRouter.php';
$jR=jRouter::inst( $_SERVER['DOCUMENT_ROOT'].'/z_tmp/rewrite/cnfig.php' );
if($jR->hasErrors()){  echo '<pre class="debug">'.print_r ( $jR->getErrors() ,true).'</pre>'; exit();}
//$jR->register('get','/z_tmp/rewrite/?','{docRoot}/lib/share.php/default');
//$jR->register('get','^/z_tmp/rewrite/test/?\??','TestClass/index');
//$jR->register('get','^/z_tmp/rewrite/test/(\d+)?/?$','TestClass/item');
//$t=$jR->resolve('get','/test1');
$t=$jR->run();
echo '<pre class="debug">'.print_r ( $t ,true).'</pre>';
*/
?>